package com.education.welco.mapper;

import com.education.welco.pojo.OrderQuestion;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;


/**
 * 试题表 数据层
 *
 * @author d
 * @date 2021-03-04 15:45:19
 */
@Repository
public interface OrderQuestionMapper {

    //查询试题表信息
    public OrderQuestion selectOrderQuestionById(Integer id);

    //根据试卷ID查询试题表信息
    public List<OrderQuestion> selectOrderQuestionByPaperId(@Param("paperId") Integer paperId, @Param("questionType") Integer questionType);

    // 查询试题表列表
    public List<OrderQuestion> selectOrderQuestionList(OrderQuestion orderQuestion);

    // 新增试题表
    public int insertOrderQuestion(OrderQuestion orderQuestion);

    //修改试题表
    public int updateOrderQuestion(OrderQuestion orderQuestion);

    //删除试题表
    public int deleteOrderQuestionById(Integer id);

    // 批量删除试题表
    public int deleteOrderQuestionByIds(String[] ids);

    String[] selectIdsByType(Integer type);

    String[] selectIdsByTypelf(@Param("type") Integer type, @Param("catalogId") String catalogId);

    List<Integer> selectCatalogIdList(String name);
}